<?php
	define('ABSOLUTE_SERVER_REMOTE_ADDR','../../');
	define('ABSOLUTE_SERVER_DOCUMENT_ROOT','../../');
	define('ABSOLUTE_SERVER_HOST','../../');

    include ABSOLUTE_SERVER_DOCUMENT_ROOT.'session.inc';

    require_once('../../../classDB.inc.php');
	require_once(ABSOLUTE_SERVER_DOCUMENT_ROOT.'funct.inc');
	require_once(ABSOLUTE_SERVER_DOCUMENT_ROOT.'functs.inc');
	
	require_once('discount.inc');
    include ABSOLUTE_SERVER_DOCUMENT_ROOT.'color_style.php';
    include ABSOLUTE_SERVER_DOCUMENT_ROOT.LANGUAGE;
    
    if(!GetAdminID($ID)){echo LOGIN_ERR;exit;}
    if(!Right_Check(1)){header('Location:'.ABSOLUTE_SERVER_DOCUMENT_ROOT.'error.php');exit;}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
        <?php echo '<meta http-equiv="Content-Type" content="text/html; charset='._CHARSET_.';">'; ?>

        <style  type="text/css"><!--
                table{
                        border-bottom-color: white;
                        border-top-color: black;
                        border-left-color: white;
                        border-right-color: white;
                        border-collapse: collapse;
                        font-size: 10px;
                }
                input {
                        border: 0px;
                        cursor: hand;
                        height: 15px;
                        background-color: transparent;
                        font-size: 10px;
                        list-style-type: none;
                        font-family:  verdana;
                        text-align:left;
                        padding-left: 0px;
                        margin-left: 5px;
                        margin-top:0pt;
                        margin-bottom:0px;
                }
                form {margin-top:0pt; margin-bottom:0px;}
                img {margin-top:0pt; margin-bottom:0px;}
                body{
                    margin-left:10pt;
                    margin-right:0pt;
                    margin-top:0pt;
                    margin-bottom:0pt;
                    font-family:  Verdana;
                    font-size: 10px;
                }


        --></style>
</head>

<?php
print "<body  bgcolor=\"".Background_Color."\">
<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" >
<tr><td>";// background=\"brush.jpg\"

        $_DB = new classDB();
        if ($_DB->open()){echo OPEN_DB_ERR; break;}
        
        $User_ID=$_REQUEST["User_ID"];
		$category_ID=$_REQUEST["category_ID"];
		$Tcategory_ID=$_REQUEST["Tcategory_ID"];
		$ALL_Category=$_REQUEST["ALL_Category"];
		$automatic_discount=$_REQUEST["automatic_discount"];
        $roll_menu=rutine_menu($_REQUEST["roll_menu"],$_REQUEST["ID"]);

		switch($_REQUEST["dicount_switch"])
		{
		  case 'SC_insert':	if(!($_REQUEST["discount_value"]<0 OR $_REQUEST["discount_value"]>100 OR $_REQUEST["discount_value"]=="" OR !is_numeric($_REQUEST["discount_value"]))){
		  					EditDiscountSC($User_ID,$category_ID,$_REQUEST["discount_value"]);
		  					$category_ID="";
		  					}
		  					break;
		  case 'TC_insert': if(!($_REQUEST["discount_value"]<0 OR $_REQUEST["discount_value"]>100 OR $_REQUEST["discount_value"]=="" OR !is_numeric($_REQUEST["discount_value"]))){
		  					EditDiscountTC($User_ID,$Tcategory_ID,$_REQUEST["discount_value"]);
		  					$Tcategory_ID="";
		  					}
							break;
		  case 'ALL_insert': if(!($_REQUEST["discount_value"]<0 OR $_REQUEST["discount_value"]>100 OR $_REQUEST["discount_value"]=="" OR !is_numeric($_REQUEST["discount_value"]))){
		  					EditDiscountALL($User_ID,$_REQUEST["discount_value"]);
		  					$ALL_Category="";
		  					}
							break;
		  case 'Price_insert': if(!($_REQUEST["discount_value"]<0  OR $_REQUEST["discount_value"]=="" OR !is_numeric($_REQUEST["discount_value"]))){
		  					EditDiscountPrice($User_ID,$_REQUEST["discount_value"]);
		  					$automatic_discount="";
		  					}
							break;
		}

if($User_ID!=0)
	{
	$sql_psel= "SELECT U_Surname,U_Name,U_Organisation FROM users WHERE ID=".$User_ID;
    $sql_array_Prodct = mysql_fetch_object(mysql_query($sql_psel));	
	print"<big><center><b>".D_OSOBNE_ZLAVY_PRE_UZIVATELA."</b></center></big>";
	print"<center><big><b><font color=\"#FF0000\" > ".$sql_array_Prodct->U_Surname." ".$sql_array_Prodct->U_Name." ".$sql_array_Prodct->U_Organisation."</font></b></big></center>";

if (file_exists('../discount_aut/discount_aut.inc') AND file_exists('../top_user/functions_top.inc')){
	require_once ('../discount_aut/discount_aut.inc');
	
	print "<small>".D_ZLAVY_SA_UPLATNIA_PO_DOSIAHNUTI_POZADOVANEJ_SUMY_ZA_SUCET_OBJEDNAVOK."</small>";
	print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >";//style=\"position:absolute; left:0px; top:55px;\"
         print "<tr  style=\"background-color:".BUTTON_ON_OVER.";\">";
			print "<td width=150px >";
			print "<b>".D_AKTUALNA_SUMA.":</b>";
			print "</td>";
			print "<td width=85px >";
			print "<b>".ActualOrderSumm($User_ID)." ".D_MENA."</b>";
			print "</td>";
			print "<td width=80px >";
			print "<b>za obj.</b>";
			print "</td>";
		 print "<tr style=\"background-color:".BUTTON_ON_OVER.";\"
					onmouseover=\"this.style.backgroundColor='#FDE38A'; \"
                	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='normal';\">";
			print "<td width=150px >";//this.style.fontWeight='bold';
			print "<b>".D_POZADOVANA_SUMA.":</b>";
			print "</td>";	
        	print "<td width=85px >";	
			if($automatic_discount==1)
			  {	  
                  print "<form action=\"discount_menu.php\"  method=\"post\">";
                  print "<input type=\"text\" value=\"".AutomaticDiscountPrice($User_ID)."\" name=\"discount_value\" size=\"8\" maxlength=\"8\" 
							style=\"background-color:white;border:1px solid black;\" />";
                  print "<b> ".D_MENA."</b>";
				  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='".D_OK."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"1\" name=\"automatic_discount\" />";
	              print "<input type=\"hidden\" value=\"Price_insert\" name=\"dicount_switch\" />";
 			  }
 			  else
 			  {   
				  print "<form action=\"discount_menu.php\" method=\"post\">";
                  print AutomaticDiscountPrice($User_ID);
                  print "<b> ".D_MENA."</b>";
                  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='".D_ZMENIT_SUMU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"1\" name=\"automatic_discount\" />";
                  
	 		} 
				print "</form>"; 
			    print "</td>";
	 			print "</tr></table>";
}
	}
else
    {
    print"<big><center><b>".D_HROMADNE_PERCENTUALNE_PRECENOVANIE."</b></center></big>";
  }
  
  	
	 			
	   print "<br><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";// style=\"position:absolute; left:0px; top:90px;\"
        //**********************************************************************
        //
        //ROZROLOVANIE MENU PRI VYKRESLOVANI STRANKY - TOP MENU
        //
        //**********************************************************************
         print "<tr style=\"background-color:".BUTTON_ON_OVER.";\"
					onmouseover=\"this.style.backgroundColor='#FDE38A'; this.style.fontWeight='bold';\"
                	onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='normal';\"
				>";
			print "<td>";
			print "<u>".D_PRECENIT_VSETKY_KATEGORIE."</u>";
			print "</td>";	
        	print "<td width=80px >";	
			if($ALL_Category==1)
			  {	  
                  print "<form action=\"discount_menu.php\"  method=\"post\">";
                  print "<input type=\"text\" value=\"\" name=\"discount_value\" size=\"5\" maxlength=\"3\" 
							style=\"background-color:white;border:1px solid black;\" /> % ";
                  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='".D_OK."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"1\" name=\"ALL_Category\" />";
	              print "<input type=\"hidden\" value=\"ALL_insert\" name=\"dicount_switch\" />";
 			  }
 			  else
 			  {   
				  print "<form action=\"discount_menu.php\" method=\"post\">";
                  print "...";
                  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='".D_ZMENIT_ZLAVU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"1\" name=\"ALL_Category\" />";
                  
	 		} 
				print "</form>"; 
			    print "</td>";
	 			print "</tr>";
	 			
        $sql_topmnu= "SELECT * FROM top_category";
        $TMnu_Source=mysql_query($sql_topmnu);
        while($sql_array_TMnu = mysql_fetch_object($TMnu_Source))
          {

                print "<tr style=\"background-color:".TR_BACKGOUND_COLOR_1.";\"
					onmouseover=\"this.style.backgroundColor='#FDE38A'; this.style.fontWeight='bold';\"
                	onmouseout= \"this.style.backgroundColor='".TR_BACKGOUND_COLOR_1."'; this.style.fontWeight='normal';\"
				>";
		print "<td  style=\"background-repeat:repeat-x;background-position:0px 0px;\">"; //colspan

                //print "<td colspan=\"2\">";

	if($sql_array_TMnu->TC_Have_SC==1){  //ak existuje podmenu - form odkazuje na svoju vlastnu stranku, do ktorej sa zaznamena ID Top menu
   					 print "<form action=\"discount_menu.php\" method=\"post\">";
                    print "<input type=\"hidden\" value=\"".$sql_array_TMnu->ID."\" NAME=\"ID\" />";
                	print "<input type=\"submit\" value=\"".$sql_array_TMnu->TC_Caption."\" style=\"width :150px\";";
	                print " onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bolder';\"";
	                print " onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	                print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
					print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
					print "</form>";
				
				print "</td>";
			
				
			print "<td width=80px >";	
			if($Tcategory_ID==$sql_array_TMnu->ID)
			  {	  
                  print "<form action=\"discount_menu.php\"  method=\"post\">";
                  print "<input type=\"text\" value=\"\" name=\"discount_value\" size=\"5\" maxlength=\"3\" 
							style=\"background-color:white;border:1px solid black;\" /> % ";
                  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='OK' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"".$sql_array_TMnu->ID."\" name=\"Tcategory_ID\" />";
	              print "<input type=\"hidden\" value=\"TC_insert\" name=\"dicount_switch\" />";
 			  }
 			  else
 			  {   
				  print "<form action=\"discount_menu.php\" method=\"post\">";
                  print "...";
                  print "</td>";
                  print "<td>";
                  print "<input type=\"submit\" value='".D_ZMENIT_ZLAVU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
                    	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
                    	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
	 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
	 			  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
				  print "<input type=\"hidden\" value=\"".$sql_array_TMnu->ID."\" name=\"Tcategory_ID\" />";
                  
	 		} 
				print "</form>";
			    print "</td>";
                print "</tr>";
	
	}
    else                                //ak neexistuje podmenu
    {
        $sql_submnu= "SELECT * FROM sub_category WHERE TC_ID=".$sql_array_TMnu->ID;
        $SMnu_Source=mysql_query("$sql_submnu");
        $sql_array_SMnu = mysql_fetch_object($SMnu_Source);
    	print "<input type=\"submit\" value=\"".$sql_array_TMnu->TC_Caption."\" style=\"width :150px\";";
        print " onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bolder';\"";
        print " onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
  
  if($category_ID==$sql_array_SMnu->ID)
							  {
	                              print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "<td>";
	                              print "<input type=\"text\" value=\"".DiscountPercentUSER($sql_array_SMnu->ID,$User_ID)."\" name=\"discount_value\" size=\"5\" maxlength=\"3\" 
											style=\"background-color:white;border:1px solid black;\" /> % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='".D_OK."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
					              print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"category_ID\" />";
								  print "<input type=\"hidden\" value=\"SC_insert\" name=\"dicount_switch\" />";
					              print "</td>";
				 			  }
				 			  else
				 			  {
				 			      print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "<td width=80px >";
	                              print DiscountPercentUSER($sql_array_SMnu->ID,$User_ID)." % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='".D_ZMENIT_ZLAVU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
								  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"category_ID\" />";
                                  print "</td>";	
				 			  }
							  print "</form>";
                      print "</tr>"; 
	}

                //nastavenie tlacitka
                
				

                //**************************************************************
                //
                //ak existuje SUB MENU a je rozrolovane
                //
                //**************************************************************
                //tu sa vytvara zoznam formularov - zobrazenych ako podmenu, ktore
                //po kliknuti na tlacitko odosielaju udaje do formulara "products.php"
                 if(is_roll($roll_menu,$sql_array_TMnu->ID))
                 {
                  $sql_submnu= "SELECT * FROM sub_category WHERE TC_ID=".$sql_array_TMnu->ID;
                  $SMnu_Source=mysql_query("$sql_submnu");
                   while($sql_array_SMnu = mysql_fetch_object($SMnu_Source))
                   {
                   print "<tr style=\"background-color:".TR_BACKGOUND_COLOR_2.";\"
					onmouseover=\"this.style.backgroundColor='#FDE38A'; this.style.fontWeight='bold';\"
                	onmouseout= \"this.style.backgroundColor='".TR_BACKGOUND_COLOR_2."'; this.style.fontWeight='normal';\"
				>";
			print "<td align=\"right\" background=\"tien_menu_roll_down.bmp\" style=\"background-repeat:repeat;background-position:0px 0px;\">";
                            //  print "<td>";
                            //  print "<img  src=\"L.bmp\" align=\"left\" alt=\"-\" border=\"0px\">";        //img
                             // print "</td>";
                             // print "<td>";
                               // print "<form action=\"discount_menu.php\" target=\"contents\" method=\"post\">";
                                    print "<input type=\"submit\" value=\"".$sql_array_SMnu->SC_Caption."\" style=\"width :135px\";";
                                        print " onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\"";
                                        print " onmouseout= \"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
                                    print "<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"category_ID\" />";
                                
                              print "</td>";
                              //print "</form>";
                              
                              if($category_ID==$sql_array_SMnu->ID)
							  {
	                              print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "<td>";
	                              print "<input type=\"text\" value=\"".DiscountPercentUSER($sql_array_SMnu->ID,$User_ID)."\" name=\"discount_value\" size=\"5\" maxlength=\"3\" 
											style=\"background-color:white;border:1px solid black;\" /> % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='OK' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
					              print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"category_ID\" />";
								  print "<input type=\"hidden\" value=\"SC_insert\" name=\"dicount_switch\" />";
					              print "</td>";
				 			  }
				 			  else
				 			  {
				 			      print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "<td width=80px >";
	                              print DiscountPercentUSER($sql_array_SMnu->ID,$User_ID)." % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='".D_ZMENIT_ZLAVU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
								  print "<input type=\"hidden\" value=\"".$User_ID."\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"".$sql_array_SMnu->ID."\" name=\"category_ID\" />";
                                  print "</td>";	
				 			  }
							  print "</form>";
                      print "</tr>";
                   }
                  }
         }
         print "</table><br>";
         
 if($User_ID==0)
 {       
    	print "<table>";//style=\"position:absolute; left:0px; top:55px;\"
        print "<tr  style=\"background-color:#FF2A00;\">";
		print "<td width=150px ><input type=\"submit\" value=\"AKCIA\" style=\"width :150px\";";
        print " onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bolder';\"";
        print " onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
  
  if($_REQUEST["action"]==1)
							  {
	                              print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "</td><td width=80px>";
	                              print "<input type=\"text\" value=\"".DiscountPercentUSER(0,0)."\" name=\"discount_value\" size=\"5\" maxlength=\"3\" 
											style=\"background-color:white;border:1px solid black;\" /> % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='".D_OK."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
					 			  print "<input type=\"hidden\" value=\"0\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"0\" name=\"category_ID\" />";
								  print "<input type=\"hidden\" value=\"SC_insert\" name=\"dicount_switch\" />";
					              print "</td>";
				 			  }
				 			  else
				 			  {
				 			      print "<form action=\"discount_menu.php\"  method=\"post\">";
	                              print "<td width=80px >";
	                              print DiscountPercentUSER(0,0)." % ";
	                              print "</td>";
	                              print "<td>";
	                              print "<input type=\"submit\" value='".D_ZMENIT_ZLAVU."' style=\"width :80px; border: 1px solid black; background-color: ".BUTTON_ON_OUT.";\"
		                            	onmouseover=\"this.style.backgroundColor='".BUTTON_ON_OVER."'; this.style.fontWeight='bold';\";
		                            	onmouseout=\"this.style.backgroundColor='".BUTTON_ON_OUT."'; this.style.fontWeight='normal';\" />";
					 			  print "<input type=\"hidden\" value=\"1\" name=\"action\" />";
					              print "<input type=\"hidden\" value=\"".$roll_menu."\" name=\"roll_menu\" />";
								  print "<input type=\"hidden\" value=\"0\" name=\"User_ID\" />";
								  print "<input type=\"hidden\" value=\"0\" name=\"category_ID\" />";
                                  print "</td>";	
				 			  }
							  print "</form>";
                      print "</tr></table>"; 
    }
         mysql_close();
?>
</tr></td>
</table>
</body>
</html>
